import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client'
import { BrowserRouter,Route ,Routes} from 'react-router-dom'
import { ROUTE_CONFIG } from './routes/index.ts'
import Page404 from './page/Page404/page404.tsx'
createRoot(document.getElementById('root')!).render(
  <StrictMode>
    <BrowserRouter>
      <Routes>
        {ROUTE_CONFIG.map((item) => (
          <Route key={item.path} path={item.path} element={<item.element />} />
        ))}
          <Route  path="*" element={<Page404 />} />
      </Routes>
    </BrowserRouter>

  </StrictMode>,
)
